package com.hducms.common.util;

import java.net.URISyntaxException;

public class PathUtils {

	static String webRoot="";
	//禁止实例化
	public PathUtils() {
		
	}
	static{
		String temp = null;
		try {
			temp = PathUtils.class.getClassLoader().getResource("").toURI().getPath();
		} catch (URISyntaxException e) {
			System.out.println("get Path error!");
		}
		if (temp.indexOf("WEB-INF")>0) {
			webRoot = temp.substring(0, temp.indexOf("WEB-INF"));
		}
	}
	public static String getWebRoot() {
		return webRoot;
	}
	
}
